testsuite: No warnings on type conversions please
authorBenjamin Otte <otte@gnome.org>
Sun, 7 Feb 2016 19:14:02 +0000 (20:14 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 11 Feb 2016 02:44:47 +0000 (03:44 +0100)
long is 32bit on win64, so it's int cast to pointer of different size, and gcc doesn't like that.

testsuite/gtk/object.c

index d80b4758bb7777e7500a4b3fb0cfcd7d911f0a19..2da5bdceb3dd0e5c0d6cf34ef32db1d6af0cf4cf 100644 (file)
@@ -187,9 +187,9 @@ value_as_pointer (GValue *value)
   if (G_VALUE_HOLDS_UINT (value))
     return GUINT_TO_POINTER(g_value_get_uint (value));
   if (G_VALUE_HOLDS_LONG (value))
-    return (void*) g_value_get_long (value);
+    return GSIZE_TO_POINTER ((gssize) g_value_get_long (value));
   if (G_VALUE_HOLDS_ULONG (value))
-    return (void*) g_value_get_ulong (value);
+    return GSIZE_TO_POINTER (g_value_get_ulong (value));
   if (G_VALUE_HOLDS_FLOAT (value))
     return (void*) (gssize) g_value_get_float (value);
   if (G_VALUE_HOLDS_DOUBLE (value))